<template>
  <el-tabs v-model="active" @tab-click="handleClick">
    <el-tab-pane
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :disabled="item.disabled"
      :name="item.value"
    />
  </el-tabs>
</template>

<script>
export default {
  props: {
    value: {
      default: '',
    },
    options: {
      default: () => [],
    },
  },
  data() {
    return {
      active: '',
    };
  },
  watch: {
    value: {
      handler(val) {
        this.active = val;
      },
      immediate: true
    },
  },
  computed: {},
  created() {},
  mounted() {},
  methods: {
    handleClick(tab) {
      this.$emit('input', tab.name);
    },
  },
};
</script>
<style lang="scss" scoped>
/* @import url(); 引入css类 */
</style>
